import com.mi.work2.Person1;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.TestConstructor;


public class test {
    @Test
    public void test1()
    {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
//        Person1 p1=(Person1) applicationContext.getBean("p1");
        Person1 p2=(Person1) applicationContext.getBean("p2");
        System.out.println(p2);

    }
}